export const imgerror = {
  inserted(el, binding) {
    // el>element 指令所在的那个元素
    // binding指令相关的信息
    console.log(el, binding.value)
    el.onerror = function() {
      el.src = binding.value
    }
  }
}

export const color = {
  inserted(el, binding) {
    el.style.color = binding.value
  }
}
